<template>
	<view>
		<view class="datas" @click="toDetail(item.id)">
			<image class="jourImage" :src="item.titleUrl" mode="aspectFill"></image>
			<text class="jourTitle">
				{{item.title}}
				<text class="time">{{item.time}}</text>
			</text>
			
		</view>
	</view>
</template>

<script>
	export default {
		name:"treeHoldCar",
		props:{
			item:{
				type:Object,
				default(){
					return{
						"titleUrl":"https://mp-6f81e20c-45ed-420c-8b9c-c84e21bce18b.cdn.bspapp.com/aiImage/83baf06f16c033aa986b805d1be825e.png",
						"id":"3",
						"title":"干啥",
						"time":"1年前"
					}
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			toDetail(id){
				console.log(id);
				uni.navigateTo({
					url:"/pages/treeHold/treeHoldDetail?treeHoldId="+id
				})
			}
		}
	}
</script>

<style lang="scss">
.datas{
			
			width: 85%;
			height: 13vh;
			background-color: white;
			margin: auto;
			border-radius: 2vh;
			margin-bottom: 30rpx;
			margin-top: 20rpx;
			.jourImage{
				width: 33%;
				height: 100%;
				border-radius: 2vh 0 0 2vh;
			}
			.jourTitle{
				position: relative;
				top: -45%;
				left: 10%;
				font-size: 3vh;
				.time{
					font-size: 1vh;
					// background-color: saddlebrown;	
					margin-left: 20rpx;
					color: $font-gray;
				}
				
			}
			
		}
</style>